package ch3.stack;

import java.util.ArrayDeque;
import java.util.Deque;

/**
 * @author : zhayh
 * @date : 2022-9-27 14:39
 * @description :
 */

public class DequeDemo {
    public static void main(String[] args) {
        Deque<Integer> deque = new ArrayDeque<>();
        deque.push(1);
        deque.push(2);
        deque.push(3);
        deque.push(4);
        deque.push(5);
        deque.push(6);
        deque.push(7);

        System.out.println("弹出元素：" + deque.pop());
        System.out.println("弹出元素：" + deque.pop());
        System.out.println("弹出元素：" + deque.pop());
        System.out.println("弹出元素：" + deque.pop());
        System.out.println("弹出元素：" + deque.pop());
        System.out.println("弹出元素：" + deque.pop());
    }
}
